package com.bf.electroplating.pojo.enums;

public enum WarnTypeEnums {

    PRODUCT_TIME_ELE("1", "生产设施用电量预警"),
    RAIN_ELE("2", "雨排口预警");


    private final String code;
    private final String desc;

    private WarnTypeEnums(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {

        for (PubDataHistoryTypeEnum item : PubDataHistoryTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }

        return null;
    }
}
